package com.couchcrowler.server.context;

import com.couchcrowler.server.GreetingServiceImpl;
import com.couchcrowler.server.ProfileParserServlet;
import com.couchcrowler.server.dao.ProfileDao;
import com.couchcrowler.server.dao.impl.ProfileDaoImpl;
import com.couchcrowler.server.parser.ProfileParser;
import com.google.inject.servlet.ServletModule;

public class CcServletModule extends ServletModule {
	@Override
	protected void configureServlets() {		
		bind(ProfileDao.class).to(ProfileDaoImpl.class);
		bind(ProfileParser.class).toInstance(new ProfileParser());
		
		serve("/couchcrowler/greet").with(GreetingServiceImpl.class);
		serve("/parse").with(ProfileParserServlet.class);
		serve("/task/parse").with(ProfileParserServlet.class);
	}
}